package com.ruoyi.common.core.domain.entity;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * @ClassName WxLoginParam
 * @Author 任宝坤
 * @Date 2025/9/28 16:39
 * @Version v1.0
 **/

@Component
public class WxLoginParam {

    @Value("${wx.appid}")
    private String appId;
    @Value("${wx.secret}")
    private String appSecret;
    @Value("${wx.loginUrl}")
    private String loginUrl;

    public String getLoginUrl() {
        return loginUrl;
    }

    public void setLoginUrl(String loginUrl) {
        this.loginUrl = loginUrl;
    }

    private String js_code;
    private String grant_type;



    public static WxLoginParam pre(String code){
        WxLoginParam param = new WxLoginParam();
        param.setCode(code);
        param.setGrant_type("authorization_code");
        return param;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getAppSecret() {
        return appSecret;
    }

    public void setAppSecret(String appSecret) {
        this.appSecret = appSecret;
    }

    public String getJs_code() {
        return js_code;
    }

    public void setCode(String code) {
        this.js_code = code;
    }

    public String getGrant_type() {
        return grant_type;
    }

    public void setGrant_type(String grant_type) {
        this.grant_type = grant_type;
    }
}
